home *** CD-ROM | disk | FTP | other *** search
- Assembly Language Compile Time Utility
-
- By: After 10/1/85:
- Daniel A. Segel Daniel A. Segel
- 1208 Pine Lane 401 Circle Drive West
- Davis,CA. 95616 Los Angeles, Ca, 90024
-
-
- This package should have the following program:
-
- TIMER.COM PROGRAM TO START AND STOP TIMER AND DISPLAY ELAPSED TIME
- TIMER.DOC THIS DOCUMENT
-
- This compile time utility is heavily based upon another work written
- by Terry Davis of Los Angeles. His program was too useful to ignore, but
- it suffered from being large and in three seperate pieces (a result of
- it being written in the C language). I took it upon myself to write a
- similar program that would overcome these limitations, and turned to
- assembly language as a way of making it small and complete.
-
- The purpose of this program is to time various events, such as
- the compilation of a large program, and signal the user when the process
- is finished. It then displays the starting, ending, and elapsed times.
- Once the timer is started it can be "stopped" at any time and the elapsed
- time will be displayed. Note that the timer will remember it's starting
- time as long as the computer is not rebooted. Every time you "stop" the
- timer, it will display the elapsed time from the starting time to that point.
- This program has been tested on an IBM PC and a COMPAQ under PC-DOS 2.1
- and 3.0, but it should work on any fairly compatable machine running PC-DOS.
- See the explanation of how it works (below) if you have any doubts.
-
- To start the timer enter <TIMER on> with nothing following. A
- message will be displayed indicating the starting time. At any point
- later on, you may obtain the elapsed time by entering <TIMER off>. The
- starting and ending times will be displayed, along with the elapsed time.
- Note that if you enter <TIMER offb> (exactly the same except for the final
- b) a bell will be sounded when the elapsed time is displayed.
-
- This program may be placed in a batch file along with the commands
- used to assemble or compile your programs. There are generally two reasons
- why you would want to use it: 1) you want to know how long it took to
- compile or assemble your program, and 2) you want a signal that the computer
- is finished. An example of how it could be used in a batch file follows:
-
- timer on
- masm %1.asm,%1.obj;
- link %1.obj,%1.exe;
- exe2bin %1.exe %1.com
- timer offb
-
- If this batch file were called ASM.BAT, then entering <ASM b:timer> would
- start the timer, assemble, link and convert to binary a program on the
- b: drive named timer.asm, and then tell you how long it took and beep.
-
-
- HOW IT WORKS
-
- This is only a brief description. For more information, send me a disk
- and I'll send you the source code.
-
- This program uses the PC/MS-DOC function call 2cH to get the time from
- the system clock. This time is then stored in memory using memory
- locations that are reserved for user interupts (0000:0198-0000:019C).
- It is unlikely that this memory is going to be used by a commercial program,
- but this is where compatability problems might arise. The program can use
- any 8 byte area -- if it doesn't work on your computer, find an unused
- area of memory and write me for instructions on how to patch TIMER.COM.
-
- The time stored in memory is retreived by the program during its off cycle,
- and the elapsed time is computed by subtracting starting time from ending
- time. Various checks are performed to account for midnight rollover and
- lower ending times (i.e. ending minutes are lower than starting).
-
-